﻿<%@ Page Language="C#" MasterPageFile="~/MasterBackEnd.Master" AutoEventWireup="true"
    CodeFile="Admin.aspx.cs" Inherits="Pages_Config_Admin" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script src="/Js/Popup/ShowListRoleNotInAdmin.js" type="text/javascript"></script>
    <script src="/Js/Pages/Config/Admin.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            Pages_ListAdmin.documentReady();
        });
    </script>
    <script type="text/javascript">
        $(function () {
            $("#txtFromDate").datepicker({
                changeMonth: true,
                changeYear: true
            });
            $("#txtToDate").datepicker({
                changeMonth: true,
                changeYear: true
            });
            $("#txtBirthdayUpdate").datepicker({
                changeMonth: true,
                changeYear: true
            });
        });
    </script>
    <script type="text/javascript">
        function validateDigit(evt) {
            try {
                var keyCode = evt.keyCode ? evt.keyCode : evt.which;
                var key = String.fromCharCode(keyCode);
                if (key && (/[a-zA-Z]/.test(key) || /[{}=|_<>,\?~`ơư!@#$%^&*().+-]/.test(key))) {
                    return (false);
                }
                return (true);
            } catch (err) {
                return true;
            }
        }
    </script>
    <style type="text/css">
        .content_info_left
        {
            width: 110px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="content" runat="Server">
    <div class="tabs_wrapper">
        <ul class="tabs">
            <li class="selected tab_link"><span class="tab_link">Quản lý Admin</span> </li>
        </ul>
    </div>
    <div class="container_data" id="divSearch">
        <div class="header_container">
            <span class="container_text">Tìm kiếm</span>
            <div class="clear">
            </div>
        </div>
        <div class="content padding0">
            <div class="form form_3cols">
                <div class="content_info">
                    <ul>
                        <li class="content_info_left">Tài khoản:</li>
                        <li class="content_info_right" style="width: 160px">
                            <input type="text" id="txtUserName" class="input_text" /></li>
                        <li class="content_info_left">Mã tài khoản:</li>
                        <li class="content_info_right">
                            <input type="text" id="txtAdminID" class="input_text" onkeypress="return validateDigit(event);" /></li>
                        <li class="content_info_left">Trạng thái:</li>
                        <li class="content_info_right" style="width: 125px">
                            <select id="ddlStatusAdmin">
                            </select></li>
                        <div style="clear: both">
                        </div>
                    </ul>
                </div>
                <div class="content_info">
                    <ul>
                        <li class="content_info_left">Role:</li>
                        <li class="content_info_right" style="width: 160px">
                            <select id="ddlRoleAdmin">
                            </select></li>
                        <li class="content_info_left">Từ ngày:</li>
                        <li class="content_info_right">
                            <input type="text" id="txtFromDate" class="input_text" /></li>
                        <li class="content_info_left">Đến ngày:</li>
                        <li class="content_info_right">
                            <input type="text" id="txtToDate" class="input_text" /></li>
                        <div style="clear: both">
                        </div>
                    </ul>
                </div>
                <div style="clear: both;">
                </div>
            </div>
            <div class="form_btn" align="left">
                <input id="btnSearch" class="button" value="Tìm kiếm" type="button" /></div>
        </div>
    </div>
    <div class="container_data" id="divList">
        <div class="header_container">
            <span class="container_text">Danh sách Admin<span class="text_blue" style="font-size: 10px;
                padding-left: 3px; font-weight: normal" id="spTotalAdmin"></span></span>
            <div class="adminBox_Control">
                <div class="action" id="btnAddAdmin" style="background: url(/images/icon_add.gif) no-repeat scroll 3px 3px #C1E4FF;">
                    Thêm mới</div>
            </div>
            <div class="clear">
            </div>
        </div>
        <div class="content padding0">
            <div class="detailprice " style="padding: 2px;">
                <div id="divListAdmin">
                </div>
                <div id="divListAdminPaging" class="content_paging" style="float: left;">
                </div>
                <div style="clear: both;">
                </div>
            </div>
        </div>
    </div>
    <div id="divAdminDetail" style="display: none">
        <div style="padding-left: 5px 5px 5px 0px">
            <ul>
                <li style="width: 50%; padding-right: 30px; padding-left: 0px; float: left">
                    <div class="container_data">
                        <div class="header_container">
                            <span class="container_text">Thông tin cá nhân</span>
                            <div class="adminBox_Control">
                                <div class="action" id="btnUpdateAdmin" style="background: url(/images/icon_save.gif) no-repeat scroll 3px 3px #C1E4FF;">
                                    Cập nhật</div>
                                <div class="action" id="btnCancelAdmin" style="background: url(/images/icon_close.gif) no-repeat scroll 3px 3px #C1E4FF;">
                                    Bỏ qua
                                </div>
                            </div>
                            <div class="clear">
                            </div>
                        </div>
                        <div class="content padding0">
                            <div class="form form_3cols">
                                <div class="content_info">
                                    <ul>
                                        <li class="content_info_left">Tên đăng nhập: (<span style="color: Red">*</span>):</li>
                                        <li class="content_info_right" style="width:300px">
                                            <input id="txtUserNameUpdate" type="text" class="formcart2" name="" style="width: 300px; float:left" /><span style="float:right; font-size:12px; padding-top:5px"></span></li>
                                    </ul>
                                    <div style="clear: both">
                                    </div>
                                </div>
                                <div class="content_info">
                                    <ul>
                                        <li class="content_info_left">Mật khẩu: (<span style="color: Red">*</span>):</li>
                                        <li class="content_info_right" style="width:300px">
                                            <input id="txtPassUpdate" type="text" class="formcart2" name="" style="width: 300px; float:left" /><span style="float:right; font-size:12px; padding-top:5px"></span></li>
                                    </ul>
                                    <div style="clear: both">
                                    </div>
                                </div>
                                <div class="content_info">
                                    <ul>
                                        <li class="content_info_left">Họ tên (<span style="color: Red">*</span>):</li>
                                        <li class="content_info_right">
                                            <input id="txtFullNameUpdate" type="text" class="formcart2" name="" style="width: 400px" />
                                            </li>
                                    </ul>
                                    <div style="clear: both">
                                    </div>
                                </div>
                                <div class="content_info">
                                    <ul>
                                        <li class="content_info_left">Ngày sinh:</li>
                                        <li class="content_info_right">
                                            <input id="txtBirthdayUpdate" type="text" class="formcart2" name="" style="width: 400px" /></li>
                                    </ul>
                                    <div style="clear: both">
                                    </div>
                                </div>
                                <div class="content_info">
                                    <ul>
                                        <li class="content_info_left">YM:</li>
                                        <li class="content_info_right">
                                            <input id="txtYMUpdate" type="text" class="formcart2" name="" style="width: 400px" /></li>
                                    </ul>
                                    <div style="clear: both">
                                    </div>
                                </div>
                                <div class="content_info">
                                    <ul>
                                        <li class="content_info_left">Điện thoại:</li>
                                        <li class="content_info_right">
                                            <input id="txtTelephoneUpdate" type="text" class="formcart2" name="" style="width: 400px"
                                                onkeypress="return validateDigit(event);" /></li>
                                    </ul>
                                    <div style="clear: both">
                                    </div>
                                </div>
                                <div class="content_info">
                                    <ul>
                                        <li class="content_info_left">Description:</li>
                                        <li class="content_info_right">
                                            <textarea id="txtDescriptionUpdate" class="formcart2" name="" style="width: 400px;
                                                height: 70px; vertical-align: top; font-size: 12px" cols="50" rows="30"></textarea></li>
                                    </ul>
                                    <div style="clear: both">
                                    </div>
                                </div>
                                <div style="clear: both">
                                </div>
                                <div class="content_info" id="divStatusUpdate">
                                    <ul>
                                        <li class="content_info_left">Trạng thái:</li>
                                        <li class="content_info_right">
                                            <select id="ddlStatusUpdate">
                                            </select></li>
                                        <div style="clear: both">
                                        </div>
                                    </ul>
                                </div>
                                <div class="content_info" id="divCreateDate">
                                    <ul>
                                        <li class="content_info_left">Ngày tạo:</li>
                                        <li class="content_info_right">
                                            <label id="lbCreateDateUpdate" class="formcart2" style="margin-left: 0px">
                                            </label>
                                        </li>
                                        <div style="clear: both">
                                        </div>
                                    </ul>
                                </div>
                                <div style="clear: both">
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div style="clear: both;">
                    </div>
                </li>
                <li style="width: 47%; float: left">
                    <div id="divRoleAdmin" class="container_data">
                        <div class="header_container">
                            <span class="container_text">Phân quyền</span>
                            <div class="adminBox_Control">
                                <div class="action" id="btnAddRoleToAdmin" style="background: url(/images/icon_add.gif) no-repeat scroll 3px 3px #C1E4FF;">
                                    Thêm mới</div>
                            </div>
                            <div class="clear">
                            </div>
                        </div>
                        <div class="content padding0">
                            <div class="detailprice" style="padding: 2px;">
                                <div id="divListRoleAdmin">
                                </div>
                                <div style="clear: both;">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div style="clear: both;">
                    </div>
                </li>
                <div style="clear: both">
                </div>
            </ul>
        </div>
        <div style="clear: both;">
        </div>
    </div>
</asp:Content>
